GXStartJob
You can use theGXStartJob
function to initiate printing when a user wants to print a document.
void GXStartJob (gxJob aJob, StringPtr docName, long pageCount);
aJob
- A reference to the job object of the print job to print.
docName
- The name of the document to print.
pageCount
- The number of pages to print.
DESCRIPTION
You use theGXStartJob
function to begin printing a document. In theaJob
parameter, you specify the job object associated with the document to print. In thedocName
parameter, you specify the name of the user's document. You can set this parameter tonil
to use the default document name.In the
pageCount
parameter, you specify the total number of pages the user chose to print or pass 0 if the page count is unknown. You can call theGXGetJobPageRange
function to obtain the page range. In response to theGXStartJob
call, QuickDraw GX displays the current page and the print job's page count, if it is known, in the Status dialog box.SPECIAL CONSIDERATIONS
Immediately after you call theGXStartJob
function, you should check for errors by calling theGXGetJobError
function. Only if no errors are returned should you call theGXFinishJob
function.RESULT CODES
gxPrUserAbortErr The user has canceled printing. gxSegmentLoadFailedErr A required code segment could not be found, or there was not enough memory to load it. SEE ALSO
Listing 2-5 on page 2-21 and Listing 2-6 on page 2-23 show how to use theGXStartJob
function to begin printing a document.For information about the
GXGetJobPageRange
function, see the previous section.The
GXGetJobError
function is described on page 2-52. TheGXFinishJob
function is described on page 2-65.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help